/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package db;

import java.sql.Statement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Scumm
 */
public class CDActividad {

      private Statement sentencia;


   public ResultSet Selection(Connection con) throws SQLException
   {
        ResultSet rs = null;

        try {
            sentencia = con.createStatement();
            rs = sentencia.executeQuery( "SELECT top 10 format(Fecha,'dd/mm/yyyy') as FechaFormat FROM ACTIVIDAD order by fecha desc;" );

        } catch (SQLException ex) {
           throw  ex;
        }

        return rs;

   }
}
